import axios from "@/utils/myaxios";
// 例子：  localhost:3000/post?pageIndex=1&pageSize=2&category=8
// 获取栏目数据中的文章类容
export const getpostlist = (params) => {
    return axios({
        url: '/post',
        params,
    })
}
// 文章详情    url /post/:id
export const getAritcalDetail = (id) => {
    return axios({
        url: `/post/${id}`
    })
}
// 文章点赞  参数文章id
export const post_like = (id) => {
    return axios({
        url: `/post_like/${id}`
    })
}
// 文章收藏  参数文章id
export const post_star = (id) => {
    return axios({
        url: `/post_star/${id}`
    })
}
// 评论列表
export const post_comment = (id) => {
    return axios({
        url: `/post_comment/${id}`
    })
}
// 发表pinglun
export const send_comment = (id, data) => {
    return axios({
        method: 'post',
        url: `/post_comment/${id}`,
        data,
    })
}

